Use this to create a URL to controller mapping for a custom app or for a website controller. Use either the admin or website controller root objects depending on whether you want to create a controller for websites or for the administration system
- controllerMappings.adminController() - For admin screens
- controllerMappings.websiteController() - For website controllers
controllerMappings.adminController().path("/bluefin").enabled(true).defaultView(views.templateView("bluefin/manageProjects")) .addMethod("POST", "addProject", "newProjectName") .addMethod("POST", "setupDatabase", "setupDatabase") // temporary only, needs to be part of initialisation .addMethod("POST", "newCandidate", "newCandidateId") .addMethod("POST", "publish", "publish") .addMethod("POST", "startSync", "sync") // start a sync operation, will redirect if need oauth login .addMethod("POST", "updateFields", "updateFields") // update project fields .build();
Methods
Name | Returns | Notes | Example |
---|---|---|---|
path ( s ) | ControllerMappingBuilder | ||
addPathResolver ( groupName, resolver ) | ControllerMappingBuilder | ||
enabled ( b ) | ControllerMappingBuilder | ||
defaultView ( view ) | ControllerMappingBuilder | ||
addMethod ( method, function ) | ControllerMappingBuilder | ||
addFunction ( method, function ) | ControllerMappingBuilder | ||
addMethod ( method, functionName, requiredParam ) | ControllerMappingBuilder | ||
addFunction ( method, function, requiredParam ) | ControllerMappingBuilder | ||
addMethod ( method, functionName, requiredParam, view ) | ControllerMappingBuilder | ||
addFunction ( method, function, requiredParam, view ) | ControllerMappingBuilder | ||
isPublic ( isPub ) | ControllerMappingBuilder | ||
postPriviledge ( s ) | ControllerMappingBuilder | ||
types ( types ) | ControllerMappingBuilder | ||
addType ( type ) | ControllerMappingBuilder |
Ask a question, or offer an answer